-
Notifications
You must be signed in to change notification settings - Fork 182
Fix(test): resolve data race in StreamedRequest #1727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix(test): resolve data race in StreamedRequest #1727
Conversation
Replaces the boolean flag and timer goroutine with a channel and select statement to prevent a data race on the timeout in integration tests. This ensures safe concurrent access when handling test timeouts.
@LukeAVanDrie: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Hi @LukeAVanDrie. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahg-g, LukeAVanDrie The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind test
/kind flake
What this PR does / why we need it:
This PR fixes a data race in the
StreamedRequest
integration test utility function. The race occurred due to unsynchronized access to a boolean flag used for timeout handling between the main test goroutine and a timer goroutine.The fix replaces the boolean flag and timer goroutine with a channel and select statement. This ensures that communication between the goroutines is safe and prevents the data race, making the test suite more stable.
Which issue(s) this PR fixes:
Fixes #1718
Does this PR introduce a user-facing change?: